import { useModel } from '@umijs/max';

const RoleText = (props: any) => {
  const { obj } = useModel('role');
  if (obj[props.text]) {
    return <>{obj[props.text].name}</>;
  }
  return '';
};

export default RoleText;
